import json
import os


def read_user_and_address_data():
    filename = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    user_data_path = os.path.join(filename, "data", "user.json")
    address_data_path = os.path.join(filename, "data", "address.json")
    login_data_path = os.path.join(filename, "data", "back_login.json")
    with open(user_data_path, "r", encoding="utf-8") as f:
        user_data = json.load(f)
    with open(address_data_path, "r", encoding="utf-8") as f:
        address_data = json.load(f)
    with open(login_data_path, "r", encoding="utf-8") as f:
        login_data = json.load(f)
    return user_data, address_data,login_data
